// Loggr::Tools::Guard
// Tools make Loggr be more autonomous.
// By George Ulyanov (c) 2010

#ifndef LOGGR_TOOLS_GUARD_H_
#define LOGGR_TOOLS_GUARD_H_

namespace Loggr
{
    namespace Tools
    {
        struct GuardData;   /** Pre-declaration. */

        /**
        *   @brief Own type of synchronization.
        */
        class Guard
        {
        private:
            GuardData* m_data;

        public:
            /**
            *   @brief Default constructor.
            */
            Guard();

            /**
            *   @brief Destructor.
            */
            ~Guard() throw();

            /**
            *   @brief Locking function.
            */
            void Lock();

            /**
            *   @brief Unlocking function.
            */
            void Unlock();
        };
    }
    // namespace Tools
}
// namespace Loggr

#endif // LOGGR_TOOLS_GUARD_H_
